#!/usr/bin/env bash
# =====================================
## ！！！！！！  一定要科学上网   ！！！！！！


# =====================================
## 安装 homeassistant
# 下载deb安装包
wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
# 安装
sudo dpkg -i homeassistant-supervised.deb

echo "============================================================="
echo "安装 homeassistant 成功！！"
echo "homeassistant 默认配置文件位置在： /usr/share/hassio/homeassistant/"

ls -la /usr/share/hassio/homeassistant/*
echo ""
echo "============================================================="
echo "homeassistant 默认配置文件内容："
echo ""
cat /usr/share/hassio/homeassistant/configuration.yaml
echo ""

echo "============================================================="

echo "查找 homeassistant 文件，所有配置文件在 ${HOME}/homeassistant-configs.log 文件中"
rm -rf "${HOME}/homeassistant-configs.log"
touch "${HOME}/homeassistant-configs.log"
find / -name "homeassistant" > "${HOME}/homeassistant-configs.log"

cat "${HOME}/homeassistant-configs.log"

exit 0;


